<extend name="common:commonTemplate" />

<block name="main_content">
<div class="content3">
	<div class="accontft">
      <p class="accout_k2">可提现余额（元）</p>
      <p class="account_num2">{$promoter_en.withdraw_amount}</p>
  </div>

<div id="main_div" curr_index="0" class="orderlist2">
    <ul>
        <li id="next_page">
			<dd style="padding:0" class="login_tips">
				<a href="javaScript:void(0);" id="btn_next_page" class="btn_lower2">下一页</a>
			</dd>
		</li>
    </ul>
</div>
</div>
<div class="fixnav">
    <a href="/admin/home" class=""><img src="/Public/images/menu_01.png" alt=""/><span>首页</span></a>
    <a href="/order/orderlist" class="focus"><img src="/Public/images/menu_02.png" alt=""/><span>所有订单</span></a>
    <a href="/promoter/center"><img src="/Public/images/menu_03.png" alt=""/><span>个人中心</span></a>
</div>
</block>

<block name="inner_script">
<script>
$(document).ready(function(){
	
	$('#btn_next_page').bind('click', function(){
		var promoter_id = $('#myaccount').attr('promoter_id');
		
		var request_index = parseInt($('#main_div').attr('curr_index')) + 1;
		
		
		var result = PromoterService.GetWithdrawList(promoter_id, request_index);
		if(result.IsSuccess == 0){
			alert(result.ErrorMsg);
			return;
		}
		else{
			$('#main_div').attr('curr_index', request_index);
			
			var html = '';
			var lst_withdraw_en = result.Result; 
			
			if(lst_withdraw_en.length > 0){
				for(var index in lst_withdraw_en){
					var withdraw_en = lst_withdraw_en[index];
					html += '<li>';
					html += '<div class="ordermain">';
					html += '<p class="fb">申请提现' + withdraw_en.withdraw_amount + '元</p>';
					html += '<p class="lower">' + withdraw_en.create_date + '</p>';
					html += '</div>';
					html += '<div class="ordersub">';
					html += '<p class="lower" style="color:red;">' + withdraw_en.status_text + '</p>';
					html += '</div>';
					html += '</li>';
				}
				
				$('#next_page').before(html);
			}
			else{
				$('#btn_next_page').text('没有数据了');
				$('#btn_next_page').unbind('click');
			}
			
			
		}
	});
	
	$('#btn_next_page').trigger('click');
	
});





 
</script>
</block>